home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
mvhelp
/
vwr_help.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
7KB
|
223 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Context Sensitive Help With Viewer"
ClientHeight = 2955
ClientLeft = 1605
ClientTop = 1575
ClientWidth = 5655
ForeColor = &H00C0C0C0&
Height = 3360
Icon = VWR_HELP.FRX:0000
KeyPreview = -1 'True
Left = 1545
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2955
ScaleWidth = 5655
Tag = "Form"
Top = 1230
Width = 5775
Begin PictureBox Panel3D5
BackColor = &H00C0C0C0&
Height = 375
Left = 4320
ScaleHeight = 345
ScaleWidth = 1065
TabIndex = 14
Top = 720
Width = 1095
Begin CommandButton cmdHelp
Caption = "&Help"
Height = 315
Left = 30
TabIndex = 15
Top = 30
Width = 1035
End
End
Begin PictureBox Panel3D4
BackColor = &H00C0C0C0&
Height = 375
Left = 4320
ScaleHeight = 345
ScaleWidth = 1065
TabIndex = 12
Top = 1200
Width = 1095
Begin CommandButton Command1
Caption = "&About"
Height = 315
Index = 1
Left = 30
TabIndex = 6
Tag = "AboutButton"
Top = 30
Width = 1035
End
End
Begin PictureBox Panel3D3
BackColor = &H00C0C0C0&
Height = 375
Left = 4320
ScaleHeight = 345
ScaleWidth = 1065
TabIndex = 11
Top = 240
Width = 1095
Begin CommandButton Command1
Cancel = -1 'True
Caption = "Close"
Height = 315
Index = 0
Left = 30
TabIndex = 5
Tag = "CloseButton"
Top = 30
Width = 1035
End
End
Begin PictureBox Panel3D2
BackColor = &H00C0C0C0&
Height = 1215
Left = 240
ScaleHeight = 1185
ScaleWidth = 2505
TabIndex = 10
Top = 600
Width = 2535
Begin DirListBox Dir1
BackColor = &H00FFFFFF&
Height = 1155
Left = 30
TabIndex = 0
Tag = "FileListBox"
Top = 30
Width = 2475
End
End
Begin PictureBox Panel3D1
BackColor = &H00C0C0C0&
Height = 375
Left = 240
ScaleHeight = 345
ScaleWidth = 2505
TabIndex = 9
Top = 2400
Width = 2535
Begin TextBox Text1
BackColor = &H00FFFFFF&
Height = 315
Left = 30
TabIndex = 1
Tag = "TextBox"
Text = "Topic 2"
Top = 30
Width = 2475
End
End
Begin PictureBox Frame3D1
Height = 1095
Left = 3720
ScaleHeight = 1065
ScaleWidth = 1665
TabIndex = 8
Top = 1680
Width = 1695
Begin PictureBox Option3D2
Height = 255
Left = 360
ScaleHeight = 225
ScaleWidth = 1065
TabIndex = 4
Tag = "OptionButton2"
Top = 720
Width = 1095
End
Begin PictureBox Option3D1
Height = 255
Left = 360
ScaleHeight = 225
ScaleWidth = 1065
TabIndex = 3
Tag = "OptionButton1"
Top = 360
Width = 1095
End
End
Begin PictureBox Picture1
AutoSize = -1 'True
Height = 510
Left = 3000
Picture = VWR_HELP.FRX:0302
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 2
Tag = "PictureBox"
Top = 600
Width = 510
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Give any of these guys the focus, then hit F1:"
Height = 195
Left = 240
TabIndex = 13
Top = 240
Width = 3915
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Text Box:"
Height = 255
Left = 240
TabIndex = 7
Top = 2160
Width = 2415
End
End
Option Explicit
Sub cmdHelp_Click ()
Dim temp$
temp$ = Me.Tag
StartViewer
JumpTopic temp$
End Sub
Sub Command1_Click (index As Integer)
If index = 0 Then 'close app
Unload Me
Else 'about box
frmAbout.Show 1
End If
End Sub
' Now we're set to trap the F1 keypress (make sure the form's KeyPreview
' property is set to true):
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
Dim temp$
If KeyCode = VK_F1 Then
temp$ = screen.ActiveControl.Tag
StartViewer
JumpTopic temp$
End If
End Sub
Sub Form_Load ()
Move screen.Height \ 2 - Height \ 2, screen.Width \ 2 - Width \ 2
End Sub
' When your app ends make sure you close Viewer, just as you
' would with a Help file:
Sub Form_Unload (Cancel As Integer)
Dim temp
' close Viewer
temp = VwrQuit(vwr)
End
End Sub